﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js" ></script>
<%--<script type="text/javascript" src="http://192.168.2.9:6000/js/jquery/jquery-1.8.3.js" ></script>--%>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/json2/20160511/json2.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
	$(function(){
		var openid = '${openid}';

		var returnUrl = '${returnUrl}';

		var successJs = "window.location.href = 'http://lain001.picp.io/"+ returnUrl +"'";

		var json = {
		    "orderNo": "${orderNo}",
            "payType": 1,
            "payGate": 9,
		    "loginName": "XH_FUCK",
		    "openid":  openid,
            "body": "${body}",
            "totalAmount": "0.01",
            "successJs": successJs
        }

		$.ajax({
				  url: '/sys/trade/customertrade',
                  contentType: "application/json; charset=utf-8",
				  type:'post',
                  data: JSON.stringify(json),
				  dataType: 'json',
				  success : function (data) {
                    // if (data.result == 'fail') {
                    // 	return ;
                    // }
                    var jsapi = data.jsCode;
                    // alert(jsapi);
                    eval(jsapi);
                  }
			});
	}); 
</script>
<title>微信支付</title>
</head>
<body>
正在支付，请稍候......
</body>
</html>